package client.api;

import phasebook.client.msgs.UserProfileInfo;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("PhasebookService")
public interface PhasebookService  extends RemoteService {
	
	// Retrieve Information
	
	public CombinedResponse waitForRegions();
	
	public CombinedResponse findUsers(String regEx) throws Exception;
	
	// Submit Information 
	
	public CombinedResponse trackUser(long userId) throws Exception;
	
	public CombinedResponse untrackUser(long userId) throws Exception;
	
	public CombinedResponse registerUser(UserProfileInfo user) throws Exception;
	
	public CombinedResponse validateLogin(String userName, String password) throws Exception;
	
	public CombinedResponse updateUser(UserProfileInfo user) throws Exception;
	
	public CombinedResponse updateBalance(double balanceUpdate, long accountId) throws Exception;	
	
	public CombinedResponse publishMessage(long boardOwnerId, String message, boolean isPrivate, Long photoId) throws Exception;

	public CombinedResponse deleteMessage(long messageId) throws Exception;
	
	public CombinedResponse requestFriendship(long friendId) throws Exception;
	
	public CombinedResponse cancelFriendship(long friendId) throws Exception;
	
	public CombinedResponse cancelFriendshipRequest(long friendId) throws Exception;
	
	public CombinedResponse denyFriendshipRequest(long friendId) throws Exception;
	
	public CombinedResponse acceptFriendshipRequest(long friendId) throws Exception;
	
	public CombinedResponse placeBet(double ammount, int result) throws Exception;
}
